//
//  main.m
//  test
//
//  Created by 曾泽昱 on 2024/7/10.
//

#import <Cocoa/Cocoa.h>

int (^calculateSum)(int,int) = ^int(int a,int b){
    return  a+b;
};

@interface RetainTracker : NSObject

@end

@implementation RetainTracker

- (id) init{
    if (self == [super init]){
        NSLog(@"init: Retain count of %i.",[self retainCount]);
    }
}

@end


int main(int argc, const char * argv[]) {
    int sum = calculateSum(100,200);
    NSLog(@"sum = %i",sum);
    @autoreleasepool {
        // Setup code that might create autoreleased objects goes here.
    }
    return NSApplicationMain(argc, argv);
}
